import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    language: 0,
    user: {
      token: localStorage.getItem('user')
    }
  },
  mutations: {
    getToken(state, value) {
      state.user.token = value
    },
    changeLauge(state) {
      state.language === 0 ? (state.language = 1) : (state.language = 0)
    }
  },
  actions: {},
  modules: {}
})
